import request from '@/utils/request'

// 查询消息推送设置列表
export function listParam(query) {
  return request({
    url: '/biz/messageParam/list',
    method: 'get',
    params: query
  })
}

// 查询消息推送设置详细
export function getParam(id) {
  return request({
    url: '/biz/messageParam/' + id,
    method: 'get'
  })
}

// 新增消息推送设置
export function addParam(data) {
  return request({
    url: '/biz/messageParam',
    method: 'post',
    data: data
  })
}

// 修改消息推送设置
export function updateParam(data) {
  return request({
    url: '/biz/messageParam',
    method: 'put',
    data: data
  })
}

// 删除消息推送设置
export function delParam(id) {
  return request({
    url: '/biz/messageParam/' + id,
    method: 'delete'
  })
}

// 导出消息推送设置
export function exportParam(query) {
  return request({
    url: '/biz/messageParam/export',
    method: 'get',
    params: query
  })
}

// 用户状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/biz/messageParam/changeStatus',
    method: 'put',
    data: data
  })
}
